#include "cTime_t.h"
#include "cDate_t.h"

#include<iostream>
using namespace std;

int main(){
	cout << "**************************************************************\n";
	cout << "class cTime_t test\n";
	cout << "**************************************************************\n";
	cout << "Printing current time in two formats:\n";
	cTime_t curr_time;
	curr_time.printOut(1);
	curr_time.printOut(2);

	cout << "\nCopy CTOR test:\n";
	cTime_t t = curr_time;
	t.printOut(1);
	t.printOut(2);
	
	cout << "\nPrinting time from (hours) CTOR in two formats:\n";
	cTime_t t1(11);
	t1.printOut(1);
	t1.printOut(2);

	cout << "\nPrinting time from (hours,minutes) CTOR in two formats:\n";
	cTime_t t2(21,59);
	t2.printOut(1);
	t2.printOut(2);
	
	cout << "\nPrinting time from (hours,minutes,seconds) CTOR in two formats:\n";
	cTime_t t3(23,10,02);
	t3.printOut(1);
	t3.printOut(2);

	cout << "\nTests for getters:\n";
	cout << "t3.getHours()=" << t3.getHours() << endl;
	cout << "t3.getMinutes()=" << t3.getMinutes() << endl;
	cout << "t3.getSeconds()=" << t3.getSeconds() << endl;
	
	cout << "\nTests for setters:\n";
	t3.setHours(23);
	t3.setMinutes(33);
	t3.setSeconds(32);
	t3.printOut(1);
	t3.printOut(2);

	cout << "\nAssignment operator test:\n";
	curr_time = t3;
	curr_time.printOut(1);
	curr_time.printOut(2);

	cout << "\nPlus operator test:\n";
	curr_time = t1+t2+t3;
	curr_time.printOut(1);
	curr_time.printOut(2);

	cout << endl;
	cout << "**************************************************************\n";
	cout << "class cDate_t test\n";
	cout << "**************************************************************\n";
	cout << "Printing current date in three formats:\n";
	cDate_t curr_date;
	curr_date.printOut(1);
	curr_date.printOut(2);
	curr_date.printOut(3);

	cout << "\nCopy CTOR test:\n";
	cDate_t d = curr_date;
	d.printOut(1);
	d.printOut(2);
	d.printOut(3);

	cout << "\nPrinting date from (year) CTOR in three formats:\n";
	cDate_t d1(1918);
	d1.printOut(1);
	d1.printOut(2);
	d1.printOut(3);

	cout << "\nPrinting date from (year,month) CTOR in three formats:\n";
	cDate_t d2(2000,11);
	d2.printOut(1);
	d2.printOut(2);
	d2.printOut(3);

	cout << "\nPrinting date from (year,month,day) CTOR in three formats:\n";
	cDate_t d3(2012,2,28);
	d3.printOut(1);
	d3.printOut(2);
	d3.printOut(3);

	cout << "\nTests for setters:\n";
	d3.setYear(2000);
	d3.setMonth(4);
	d3.setDay(30);
	d3.printOut(1);
	d3.printOut(2);
	d3.printOut(3);

	cout << "\nTests for getters:\n";
	cout << "d3.getYear()=" << d3.getYear() << endl;
	cout << "d3.getMonth()=" << d3.getMonth() << endl;
	cout << "d3.getMonthName()=" << d3.getMonthName() << endl;
	cout << "d3.getDay()=" << d3.getDay() << endl;
	cout << "d3.getDayOfYear()=" << d3.getDayOfYear() << endl;
	cout << "d3.isYearLeap()=" << d3.isYearLeap() << endl;
	cout << "d3.getWeekdayName()=" << d3.getWeekdayName() << endl;

	cout << "\nAssignment operator test:\n";
	curr_date = d3 = d1;
	d3.printOut(1);
	d3.printOut(2);
	d3.printOut(3);
	curr_date.printOut(1);
	curr_date.printOut(2);
	curr_date.printOut(3);



}